#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <StreamBuf/StreamBuf.h>
#include "out_handler.h"
#include "Task_Base/CriticalSection.h"
#include "rtmptask.h"
namespace Ui {
class MainWindow;
}
class NetworkAvDataRead;
class RtmpTask;
class MainWindow : public QMainWindow ,public Out_handler
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);

    ~MainWindow();

public:
   virtual bool receive_handler(unsigned char *data,int size,double pts);

protected:
    void paintEvent( QPaintEvent *event );
     void closeEvent(QCloseEvent *event);
private slots:

private:
    Ui::MainWindow *ui;

    RtmpTask *pRtmpTask;

    NetworkAvDataRead *m_pNetworkAvData;

    CCriticalSection oCriSection;

    CStreamBuf  buf_show;

    QRect desktopRc;
};

#endif // MAINWINDOW_H
